#ifndef _XPARSER_H_
#define _XPARSER_H_

#include "Direct3D.h"
#include "AnimationDef.h"

namespace Parser 
{
	extern D3DXMESHCONTAINER_EX *m_RootMesh;
	extern D3DXFRAME_EX *m_RootFrame;
	extern cAnimationSet *m_CurAniSet;

	extern BOOL ParseObject(ID3DXFileData *pDataObj, ID3DXFileData *pParentDataObj, D3DXFRAME_EX *pTopFrame);

	extern BOOL ParseChildObjects(ID3DXFileData *pDataObj, D3DXFRAME_EX *pTopFrame);

	extern BOOL Parse(const char *Filename, IDirect3DDevice9 *pDevice, const char *TexturePath);

	extern char *GetObjectName(ID3DXFileData *pDataObj);
};

#endif
